package com.yh.hljapp.modules.bean;

import com.yh.hljapp.R;
import com.yh.hljapp.fragment.ADDBackMatFragment;
import com.yh.hljapp.fragment.ADDPro_pickFragment;
import com.yh.hljapp.fragment.ADDSaleIntFragment;
import com.yh.hljapp.fragment.ADDSaleOutFragment;
import com.yh.hljapp.fragment.AboutZWScanFragment;
import com.yh.hljapp.fragment.AddHGZFragment;
import com.yh.hljapp.fragment.AddSale_Int_ListFragment;
import com.yh.hljapp.fragment.BackMatListFragment;
import com.yh.hljapp.fragment.ChangePwdFragment;
import com.yh.hljapp.fragment.Code_Fragment;
import com.yh.hljapp.fragment.CustPhoneListFragment;
import com.yh.hljapp.fragment.DBDStockFragment;
import com.yh.hljapp.fragment.Ip_Fragment;
import com.yh.hljapp.fragment.Ip_port_Fragment;
import com.yh.hljapp.fragment.SaleOutListFragment;
import com.yh.hljapp.fragment.TeamFragment;
import com.yh.hljapp.fragment.Web_Fragment;
import com.yh.hljapp.fragment.WorkReportFragment;

public enum SimpleBackPage {
    ABOUT_ZWS(1, R.string.about, AboutZWScanFragment.class),
    WORK_DETAIL(2, R.string.about, WorkReportFragment.class),
    TEAM(7, R.string.myTeam, TeamFragment.class),
//    SALARYREPORT(15, R.string.about, SalaryRepotFragment.class),
//    SALE_OUT(17, R.string.about, SaleOutFragment.class),
    CUST_PHEON(18, R.string.about, CustPhoneListFragment.class),
//    GIFORMAT(19, R.string.about, MatOrGiftJPageFragment.class),
//    BACKMAT(20, R.string.about, BackMatFragment.class),
    BACKMATLIST(21, R.string.about, BackMatListFragment.class),
    SALE_OUT_LIST(22, R.string.about, SaleOutListFragment.class),
    ADD_BACK_MAT(23, R.string.about, ADDBackMatFragment.class),
    ADD_SALE_OUT(24, R.string.about, ADDSaleOutFragment.class),
    CHANGE_PWD(25, R.string.about, ChangePwdFragment.class),
    ADD_SALE_INT(26, R.string.about, ADDSaleIntFragment.class),
    DBD(27, R.string.about, DBDStockFragment.class),
    ADDSALE_INT_LIST(28, R.string.about, AddSale_Int_ListFragment.class),
    IP_PORT(29, R.string.about, Ip_port_Fragment.class),
    CODE(30, R.string.about, Code_Fragment.class),
    WEB(31, R.string.about, Web_Fragment.class),
    IP(32, R.string.about, Ip_Fragment.class),
    ADD_PRO_PICK(33, R.string.about, ADDPro_pickFragment.class),
    HGZ(34, R.string.about, AddHGZFragment.class),
        ;

    private int title;
    private Class<?> clz;
    private int value;

    private SimpleBackPage(int value, int title, Class<?> clz) {
        this.value = value;
        this.title = title;
        this.clz = clz;
    }

    public int getTitle() {
        return title;
    }

    public void setTitle(int title) {
        this.title = title;
    }

    public Class<?> getClz() {
        return clz;
    }

    public void setClz(Class<?> clz) {
        this.clz = clz;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public static SimpleBackPage getPageByValue(int val) {
        for (SimpleBackPage p : values()) {
            if (p.getValue() == val)
                return p;
        }
        return null;
    }
}
